<?php
	class Object {
		var $name ;
		var $id ;
		var $description ;
		function Object() {} // end_f-n
		function set_name($name) {
			$this->name = $name ;
		} // end_f-n
		function get_name() {
			return $this->name;
		} // end_f-n
		function set_id($id) {
			$this->id = $id ;
		} // end_f-n
		function get_id() {
			return $this->id;
		} // end_f-n
		function set_description($txt) {
			$this->description = $txt ;
		} // end_f-n
		function get_description() {
			return $this->description;
		} // end_f-n
		function set($name,$value) {
			$this->$name = $value ;
		} // end_f-n
		function get($name) {
			return $this->$name;
		} // end_f-n
		function append($var,$value) {
			if(!is_string($var)) {
				trigger_error(sprintf(get_class($this).'::append(): unoperable name pointer %s',gettype($var)), E_USER_ERROR) ;
			} // if
			if(is_null($this->$var)||is_bool($this->$var)) {
				$this->$var = $value;
			} // if
			elseif(is_string($this->$var)) {
				$this->$var .= $value;
			} // if
			elseif(is_real($this->$var)) {
				$this->$var += $value;
			} // if
			elseif(is_array($this->$var)) {
				array_push($this->$var,$value);
			} // if
			elseif(is_object($this->$var)) {
				$this->$var->$value = true;
			} // if
			else {
				trigger_error(sprintf(get_class($this).'::append(): unoperable data type %s',gettype($this->$var)), E_USER_ERROR) ;
			} // else
		} // end_f-n
		function drop($prop) {
			if(!isset($this->$prop)) {
				trigger_error(sprintf(get_class($this).'::drop(): property %s is not set',$prop), E_USER_ERROR);
			} // if
			unset($this->$prop);
		} // end_f-n
		function init($props) {
			if(!is_array($props)) {
				trigger_error(sprintf(get_class($this).'::init(): property you are setting is %s and not array.',gettype($prop)), E_USER_ERROR);
			} // i f
			if(!empty($props)) {
				foreach($props as $k=>$v) {
					$this->set($k,$v);
				} // f o r e a c h
			} // i f
		} // f u n c t i o n
	} // end_class	 
?>